Handle failure to manually create E-Document from posted doc with no …#8183
Open
georgepomazkov wants to merge 3 commits into
Open
Handle failure to manually create E-Document from posted doc with no …#8183georgepomazkov wants to merge 3 commits into
georgepomazkov wants to merge 3 commits into
Conversation
Author
|
@microsoft-github-policy-service agree |
JesperSchulz
previously approved these changes
May 18, 2026
Groenbech96
requested changes
May 20, 2026
Contributor
Groenbech96
left a comment
There was a problem hiding this comment.
Minor, otherwise great change.
| RunEDocumentCheck(PostedRecord, Enum::"E-Document Processing Phase"::Post); | ||
|
|
||
| NoOfExistingEDocuments := this.GetEDocumentCountForDocument(RecordRef); | ||
| EDocumentSubscribers.CreateEDocumentFromPostedDocument(PostedRecord, DocumentSendingProfile, DocumentType); |
Contributor
There was a problem hiding this comment.
Would be possible to return a bool from the CreateEDocumentFromPostedDocument.
Then exit(EDocumentSubscribers.CreateEDocumentFromPostedDocument(PostedRecord, DocumentSendingProfile, DocumentType)).
Less load, since we have the information inside the function call.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes message 'The e-document has been created.' being shown to user when the e-document was not in fact created.
What & why
In cases when the e-document could not be manually created from a posted document page with no explicit error, the system would still tell the user that 'The e-document has been created.'.
The fix implements propagating the result of creating E-Document back to the calling procedure
CreateEDocumentFromPostedDocumentPage()which returns true if the e-document was created and false otherwise, in which case message 'The e-document could not be created.' is shown to user.Linked work
Fixes #8181
How I validated this
What I tested and the outcome (required ΓÇö be specific: scenarios, commands, screenshots for UI changes)
Manually tested the case for posted sales invoice described in the issue, the system showed the following message when the e-document was not created due to the document type not being supported by the E-Document Service and no explicit error being thrown.
Risk & compatibility
None.
Fixes AB#636180